package com.beamfield.dao.device;

import com.beamfield.model.Device;
import com.beamfield.model.DeviceExample;
import com.beamfield.modelVo.DeviceInboundVo;
import com.beamfield.modelVo.DeviceVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeviceMapper {
    int countByExample(DeviceExample example);

    int deleteByExample(DeviceExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Device record);

    int insertSelective(Device record);

    List<Device> selectByExample(DeviceExample example);

    Device selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Device record, @Param("example") DeviceExample example);

    int updateByExample(@Param("record") Device record, @Param("example") DeviceExample example);

    int updateByPrimaryKeySelective(Device record);

    int updateByPrimaryKey(Device record);

    List<DeviceVo> selectByPurchaseId(@Param("purchaseId") String purchaseId, @Param("name")String name, @Param("offset") String offset, @Param("limit")String limit);

    int selectTotalByPurchaseId(@Param("purchaseId") String purchaseId, @Param("name")String name);

    List<String> selectAllDeviceName(@Param("beam_id") long beamId,@Param("device_purchase_id")long device_purchase_id);

    List<String> readDevice_standard(@Param("beam_id")long beamId, @Param("device_name")String deviceName);

    DeviceInboundVo selectByInboundId(@Param("inboundId") long inboundId);
}